package pap.initialization;

import java.util.ArrayList;
import java.util.List;

import pap.Point;
import pap.Vector;
import pap.bodies.Body;
import pap.bodies.SimpleBody;


public class TestBodyInitializer implements IBodyInitializer {

	@Override
	public List<Body> initAndGetBodies() {
		List<Body> bodies = new ArrayList<Body>();

		bodies.add(genSimpleBodyOne());
//		bodies.add(genSimpleBodyTwo());
//		bodies.add(genSimpleBody3());
//		bodies.add(genSimpleBody4());
//		bodies.add(genSimpleBody5());
//		bodies.add(genSimpleBody6());
//		bodies.add(genSimpleBody7());
		return bodies;
	}

	private SimpleBody genSimpleBodyOne() {

		double mass = 15000000000.0;

		Point position = new Point(new double[] {400, 400 });

		Vector speed = new Vector(new Point(new double[] { 0, 0}));

		return new SimpleBody(mass, position, speed);
	}

	private SimpleBody genSimpleBodyTwo() {

		double mass = 10;

		Point position = new Point(new double[] { 700, 700 });

		Vector speed = new Vector(new Point(new double[] { 1, -1 }));

		return new SimpleBody(mass, position, speed);
	}
	private SimpleBody genSimpleBody3() {

		double mass = 50;

		Point position = new Point(new double[] { 600, 600 });

		Vector speed = new Vector(new Point(new double[] { 2, -2 }));

		return new SimpleBody(mass, position, speed);
	}
	private SimpleBody genSimpleBody4() {

		double mass = 50;

		Point position = new Point(new double[] { 0, 0 });

		Vector speed = new Vector(new Point(new double[] { 1, -1 }));

		return new SimpleBody(mass, position, speed);
	}
	private SimpleBody genSimpleBody5() {

		double mass = 150;

		Point position = new Point(new double[] { 100, 100 });

		Vector speed = new Vector(new Point(new double[] { 2, -2 }));

		return new SimpleBody(mass, position, speed);
	}
	private SimpleBody genSimpleBody6() {

		double mass = 150;

		Point position = new Point(new double[] { 800, 400 });

		Vector speed = new Vector(new Point(new double[] { -2, 0 }));

		return new SimpleBody(mass, position, speed);
	}
	private SimpleBody genSimpleBody7() {

		double mass = 150;

		Point position = new Point(new double[] { 400, 400 });

		Vector speed = new Vector(new Point(new double[] { -2, -2 }));

		return new SimpleBody(mass, position, speed);
	}
}
